package com.pengtu.dao.app;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import com.pengtu.dao.hibernate.HibernateDao;
import com.pengtu.entity.app.Code;
import com.pengtu.entity.app.SerialNumber;

@Repository
public class SerialNumberDao extends HibernateDao<SerialNumber, String>{
	/**
	 * 
	 * getSerialNumberByType:
	 * 适用: 根据type 查询对应的SerialNumber
	 * @param type
	 * @return 
	 * @exception 
	 * @since  1.0.0
	 */
	public SerialNumber getSerialNumberByType(String type){
		Criterion typec = Restrictions.eq("type", type);
		 return findUnique(typec);
	}

}
